package com.organization
import grails.converters.JSON

class DataController {

	def dataService

    def index = {
        render ""
    }

    def getTitle = {
        render dataService.getOrganizationInfo() as JSON
    }

	def getElement = {
		render dataService.getElement(params.nodeId) as JSON
	}

    def update = {
        render dataService.updateElement(params) as JSON
    }

    def add = {
        render dataService.addElement(params) as JSON
    }

    def delete = {
        render dataService.deleteElement(params) as JSON
    }
}
